package com.jwgf.smarowindingmachine_unity.logic;

import java.util.ArrayList;

import com.jwgf.common.MultiHashMap;

public class ParameterMap {
	private MultiHashMap<String, ArrayList<Integer>> multiMap = new MultiHashMap<String, ArrayList<Integer>>();
	private static ParameterMap instance = new ParameterMap();

	private ParameterMap() {
		String index;
		ArrayList<Integer> typeList;

		index = String.valueOf(0x10);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		multiMap.put(index, typeList);

		index = String.valueOf(0x15);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		typeList.add(Byte.SIZE);
		typeList.add(Byte.SIZE);
		multiMap.put(index, typeList);

		index = String.valueOf(0x16);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		typeList.add(Byte.SIZE);
		typeList.add(Byte.SIZE);
		typeList.add(Byte.SIZE);
		typeList.add(Byte.SIZE);
		multiMap.put(index, typeList);

		index = String.valueOf(0x20);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		typeList.add(Byte.SIZE);
		typeList.add(Byte.SIZE);
		multiMap.put(index, typeList);
		
		index = String.valueOf(0x21);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		typeList.add(Byte.SIZE);
		typeList.add(Byte.SIZE);
		multiMap.put(index, typeList);
		
		index = String.valueOf(0x22);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		multiMap.put(index, typeList);
		
		index = String.valueOf(0x23);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		typeList.add(Byte.SIZE);
		typeList.add(Byte.SIZE);
		typeList.add(Short.SIZE);
		multiMap.put(index, typeList);
		
		index = String.valueOf(0x24);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
//		typeList.add(Integer.SIZE);
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		multiMap.put(index, typeList);
		
		index = String.valueOf(0x25);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		multiMap.put(index, typeList);
		
		index = String.valueOf(0x26);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		multiMap.put(index, typeList);
		
		index = String.valueOf(0x27);
		typeList = new ArrayList<Integer>();
		typeList.add(Byte.SIZE);
		typeList.add(Byte.SIZE);
		typeList.add(Byte.SIZE);
		typeList.add(Byte.SIZE);
		typeList.add(Byte.SIZE);
		typeList.add(Byte.SIZE);
		multiMap.put(index, typeList);
		
		index = String.valueOf(0x28);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		multiMap.put(index, typeList);
		
		index = String.valueOf(0x29);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		multiMap.put(index, typeList);
		
		index = String.valueOf(0x2a);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		multiMap.put(index, typeList);
		
		index = String.valueOf(0x2c);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		multiMap.put(index, typeList);
		
/*		index = String.valueOf(0x2d);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		multiMap.put(index, typeList);*/
		
		index = String.valueOf(0x2e);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		multiMap.put(index, typeList);
		
		index = String.valueOf(0x30);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		multiMap.put(index, typeList);

		index = String.valueOf(0x39);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		typeList.add(Short.SIZE);
		multiMap.put(index, typeList);
		
		index = String.valueOf(0x40);
		typeList = new ArrayList<Integer>();
		typeList.add(Short.SIZE);
		multiMap.put(index, typeList);
	}

	public static ParameterMap instance() {
		return instance;
	}
	
	public ArrayList<Integer> getTypeList(int index) {
		return multiMap.get(String.valueOf(index));
	}
}
